﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RBAC.Domain.BomManage
{
    /// <summary>
    /// BOM 主表
    /// </summary>
    [Table("Bom")]
    public class Bom : BaseEntity
    {
        /// <summary>
        /// BOM 编码
        /// </summary>
        public string Code { get; set; } = string.Empty;

        /// <summary>
        /// BOM 名称
        /// </summary>
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 关联产品Id
        /// </summary>
        public long ProductId { get; set; }

        /// <summary>
        /// 关联产品名称
        /// </summary>
        public string? ProductName { get; set; }

        /// <summary>
        /// 版本号，如：V1.0
        /// </summary>
        public string Version { get; set; } = "V1.0";

        /// <summary>
        /// 主单位（文本）
        /// </summary>
        public string? Unit { get; set; }

        /// <summary>
        /// 状态（枚举） 草稿 = 0,已发布 = 1,已冻结 = 2,作废 = 3,
        /// </summary>
        public int? Status { get; set; }

        /// <summary>
        /// 修订说明
        /// </summary>
        public string? RevisionNotes { get; set; }
    }
}
